home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Reference Guide
/
C-C++ Interactive Reference Guide.iso
/
c_ref
/
csource4
/
237_01
/
tc_inst.doc
< prev
next >
Wrap
Text File
|
1987-07-28
|
4KB
|
83 lines
The GRAD library in the distribution file is for HGA in full mode and
EPSON FX-80 or compatible printers (including IBM graphics printer). If your
system configuration is the same as the default configuration, you may skip
the next section and read the section "Compiling the GRAD sample programs".
INSTALLING GRAD LIBRARY
To install GRAD library, you need the LIB (library manager) program from
the Microsoft C compiler utility diskette or compatible ones. If you do not
have the program, you may still use GRAD library. Read the last section on how
to use GRAD library without installation.
If you are using HGA in half mode, you should extract the file from
HERCHALF.ARC and then type the commad:
LIB gradlib,-+calcaddr,,gradlib
If you are using CGA, you should extract the files from COLOR.ARC and
then type the command:
LIB gradlib,-+calcaddr-+plottype-+ftable,,gradlib
Similarly, if you want to use the OKIDATA ML192 printer driver, extract
all the files from OKI.ARC and then type the command:
LIB gradlib,-+prtcntl-+prtgc-+pframe,,gradlib
After installing the library, you have to copy GRADLIB.LIB to the appropriate
place so that the linker can find the GRADLIB.LIB at link time.
COMPILING SAMPLE PROGRAMS
If you already have the executable files of the sample programs for your
system configuration, you do not need to compile the source files and you may
skip over this section.
To compile the sample programs, you need the Turbo C compiler
version 1.0 with the small model library and GRAD library (GRADLIB.LIB)
installed. You also need to create a dummy file "sys\types.h" because some
of the sample program requires that file but Turbo C does not have this header
file.
Seven programs with source listing and one program with object module
only are included. Three of them (interp, mprint and swprt) requires the GRAD
library and others are utility programs for GRAD system and GRAD library is
not required.
To compile interp, mprint and swprt, use the following commands:
tcc -O -r -Z -f- -K -a interp.c execfunc.obj gradlib.lib
tcc -O -r -Z -f- -K -a mprint.c execfunc.obj gradlib.lib
tcc -O -r -Z -f- -K -a swprt.c gradlib.lib
To compile other programs, type:
tcc -O -r -Z -f- -K -a tex2grad.c
tcc -O -r -Z -f- -K -a rotate.c
tcc -O -r -Z -f- -K -a size.c
tcc -O -r -Z -f- -K -a time.c
link dispfont,dispfont,nul,gradlib;
USING GRAD LIBRARY WITHOUT INSTALLATION
If you don't have the LIB program or you don't want to use the driver in
the library for whatever reason, you can force a certain driver to be included
in your program instead the one in the library by including their names in
linking. For example, if you want to compile swprt using OKIDATA ML192 driver,
you should extract the files from OKI.arc and use the command:
tcc -O -r -Z -f- -K -a swprt.c prtcntl.obj pframe.obj prtgc.obj
gradlib.lib
Similarly if you you want to use any other drivers, place the names of the
object files of the driver in the command line during compilation or linking.
You only need to include the display driver only if you use the graphics
display screen. And you will need the printer driver only if you the function
PrintFrame.
In the sample programs, interp, mprint and swprt requires a printer
driver and interp, dispfont needs a display driver.